<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>How to Run Outlook Unit Tests in</title>
</head>

<body>

<p align="center"><font color="#0000FF" size="5">How to Run Outlook Unit Tests 
inside CRM Benchmark</font></p>
<ul>
	<li><font color="#008000">Build Outlook unit tests IncrementalGoOffline.cs, 
	SyncToOutlook.cs ManagedABPSync.cs (part of CRM_Perf_BenchMark). Checked in 
	at QA\Performance\Titan\CRM_Perf_BenchMark\CRM_Perf_BenchMark\Outlook</font></li>
	<li><font color="#008000">In ConfigSettings.Xml, make sure OutlookSyncDir is 
	specified when populating EnityManager database. This will create the 
	required directories and also clean up the registry ( it will remove all 
	registry keys under HKLM-&gt;Software-&gt;Microsoft starting with MSCRM.</font></li>
	<li><font color="#008000">Perform initial syncs (ABP, Sync to Outlook and 
	Offline) for all the users using OutlookStressTest tool. This will create a 
	registry MCRMUser1_OrgID under HKLU-&gt;Software-&gt;Microsoft per user. 
	Initial Goffline can be very expensive depending on the database size. Make 
	sure to set the lag in the XML files properly. We have seen that for one 
	user it takes around 3 minutes to finish initial sync. A lag value of 180 
	seconds in XML file for OutlookStressTest will work best for initial go 
	offline.</font></li>
	<li><font color="#008000">Backup CRM SQL server database. Database will have 
	SyncEntry table for each subscription id. That means 3 sync entry tables per 
	user.</font></li>
	<li><font color="#008000">Run the LoadTestOutlook.</font></li>
	<li><font color="#008000">XML files will be created for each sync under 
	OutlookSyncDir\SyncToOutlook, OutlookSyncDir\ManagedABPSync, OutlookSyncDir\GoOffline 
	for Sync to outlook, ABP and offline sync respectively. </font></li>
	<li><font color="#008000">Use ParseGoOfflineResults tool to parse the 
	results.</font></li>
</ul>

<p><b><font color="#0000FF" size="5">Tools:</font></b></p>
<p><b><font color="#800000" size="4">OutlookStressTest</font><font color="#800000" size="5"> </font>
</b>
<font color="#0000FF" size="4">(Checked in at QA\Performance\Titan\CRM_Perf_BenchMark\OutlookStressTest)</font></p>
<p><font color="#008000">A tool simulating outlook users syncing to outlook, ABP 
sync and going offline. This tool can be used for doing initial sync in case of 
Benchmark or stress testing the server. A readme file is also checked in 
explaining in detail.</font></p>
<p><font color="#008000"><br>
</font><b><font color="#800000">Usage</font></b><font color="#008000">:<br>
<br>
<b>OutlookStressTest.exe SyncToOutlook.xml</b></font></p>
<p><font color="#800000"><b>Sample Input file:</b></font></p>
<p>&lt;?xml version=&quot;1.0&quot; ?&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;Config&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;queryData <b>perflog</b>='no' <b>
test</b>='synctooutlookstresstest'&nbsp; <b>webserver</b>='crmperf1web'<b> 
sqlbox</b>='crmperf1esql' <b>domain</b>='crmperf1dom' <b>
queries</b>='1' <b>interval</b>='10'&nbsp; <b>lag</b>='10 <b>output</b>='result.xml''&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;userGroups&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&lt;userGroup <b>name</b>='crmusr' <b>startidx</b>='10' <b>count</b>='1' <b>
password</b>='crm!usr'/&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/userGroups&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/queryData&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;/Config&gt;</p>
<p><font size="4" color="#800000"><b>OfflineTestSyncDriver </b></font>
<font color="#0000FF" size="4">(Checked in at QA\Performance\Titan\CRM_Perf_BenchMark\OfflineTestSyncDriver )</font></p>
<p><font size="4" color="#0000FF">This has some functions from 
Microsoft.Crm.Application.Outlook.OfflineSync.dll overridden. In these 
functions, we are by passing any functionality dealing with SQLExpress and just 
worry about server calls.</font></p>
<p>&nbsp;</p>
<p><b><font color="#800000" size="4">ParseGoOfflineResults</font><font color="#800000" size="5"> </font> </b>
<font color="#0000FF" size="4">(Checked in at 
QA\Performance\RCPerf\ParseGoOfflineResutls)</font></p>
<p><font color="#008000">This tool parses the outlook sync results file and 
spits out results file (xml file) giving maximum, minimum and average for 
PrepareSync, MoveData and total entities that got synced.</font></p>
<p><b><font color="#800000">Command Line Parameters:</font></b><font color="#008000"><br>
-</font><b><font color="#0000FF">Dir</font></b><font color="#008000"> - 
directory where the files resides. It is a required parameter<br>
-</font><font color="#0000FF"><b>Resutls</b></font><font color="#008000"> - xml 
file name which will have the required results. It is a required parameter<br>
-</font><b><font color="#0000FF">BTime</font></b><font color="#008000"> - an 
optional parameter to specify to parse only those files whose last write time is 
greater than btime<br>
-</font><b><font color="#0000FF">ETime</font></b><font color="#008000"> - an 
optional parameter to specify to parse only those files whose last write time is 
less than the etime<br>
<br>
<br>
</font><b><font color="#800000">Usage</font></b><font color="#008000">:<br>
<br>
<b>ParseOfflineParameters -dir=c:\files -results=results.xml -btime=&quot;10/5/2005 
1PM&quot; -etime=&quot;10/5/2005 2PM&quot;</b><br>
<br>
</font><b><font color="#800000">Sample Output File:</font></b></p>
<p><font color="#008000"><br>
</font>&lt;run_result&gt;<br>
&lt;InputData NumberofFiles=&quot;8&quot; FileBeginTime=&quot;10/5/2005 1:8PM&quot; FileEndTime=&quot;10/5/2005 
1:50PM&quot; /&gt;<br>
&lt;PrepareSync Max=&quot;0:7:15&quot; Min=&quot;0:2:53&quot; Avg=&quot;0:5:12&quot; /&gt;<br>
&lt;MoveData Max=&quot;0:8:52&quot; Min=&quot;0:4:35&quot; Avg=&quot;0:6:46&quot; /&gt;<br>
&lt;TotalEntities Max=&quot;906797&quot; Min=&quot;169925&quot; Avg=&quot;383163&quot; /&gt;<br>
&lt;Max_PrepareSync_Time CreateSubscription=&quot;0&quot; PrepareSync=&quot;435&quot; MoveData=&quot;275&quot; 
TotalEntity=&quot;346266&quot; /&gt;<br>
&lt;Min_PrepareSync_Time CreateSubscription=&quot;0&quot; PrepareSync=&quot;173&quot; MoveData=&quot;532&quot; 
TotalEntity=&quot;280603&quot; /&gt;<br>
&lt;Max_MoveData_Time CreateSubscription=&quot;0&quot; PrepareSync=&quot;173&quot; MoveData=&quot;532&quot; 
TotalEntity=&quot;280603&quot; /&gt;<br>
&lt;Min_MoveData_Time CreateSubscription=&quot;0&quot; PrepareSync=&quot;435&quot; MoveData=&quot;275&quot; 
TotalEntity=&quot;346266&quot; /&gt;<br>
&lt;Max_TotalEntites CreateSubscription=&quot;0&quot; PrepareSync=&quot;297&quot; MoveData=&quot;497&quot; 
TotalEntity=&quot;906797&quot; /&gt;<br>
&lt;Min_TotalEntites CreateSubscription=&quot;0&quot; PrepareSync=&quot;210&quot; MoveData=&quot;456&quot; 
TotalEntity=&quot;169925&quot; /&gt;<br>
&lt;/run_result&gt;<font color="#008000"><br>
&nbsp;</font></p>

</body>

</html>
